package com.meng.dao;

import com.meng.pojo.Books;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookMapper {

    int addBook(Books books);
    //@Param用于传递参数，从而可以与SQL中的的字段名相对应
    int deleteBookById(@Param("bookId") int id);

    int updateBook(Books books);

    Books queryBookById(@Param("bookId") Integer id);

    List<Books> queryAllBook();

    Books queryBookByName(String bookName);
}